﻿namespace Runtime.Services.Battle {

    /// <summary>
    /// 路径ID
    /// </summary>
    public readonly struct DFR_BattleWayID {

        public static readonly DFR_BattleWayID None = new();

        /// <summary>
        /// 值
        /// </summary>
        public int Value { get; init; }

        public override bool Equals(object obj) {
            if (obj is DFR_BattleWayID other) {
                return other.Value == Value;
            }
            return false;
        }

        public override int GetHashCode() => Value.GetHashCode();

        public override string ToString() => $"[{nameof(DFR_BattleWayID)}({Value})]";

        public static bool operator ==(DFR_BattleWayID left, DFR_BattleWayID right) => left.Equals(right);
        public static bool operator !=(DFR_BattleWayID left, DFR_BattleWayID right) => !left.Equals(right);
    }
}
